package net.demo.dataSource;

import org.hibernate.cfg.ImprovedNamingStrategy;  

/**效果：把数据库名全部转换为大写 
 *  
 * jpa在正常情况下向Linux发送的数据库表名全部转换为小写，如下： 
 * com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'wpms_test.pm_oto_goods_partner' doesn't exist 
 * 解决方案如下 
 *  
 * @author CJB 
 * 
 */  
  
public class MySQLUpperCaseStrategy  extends ImprovedNamingStrategy {  
    private static final long serialVersionUID = -7351332284160156572L;  
  
    @Override  
    public String tableName(String tableName) {  
        return tableName.toUpperCase();  
    }  
} 